<?php
global $Config;
require_once($Config->WebCMSRoot.'Base/Control.php');
require_once($Config->WebCMSRoot.'Views/Navigation.php');
require_once($Config->WebCMSRoot.'Models/Navigation.php');

Class Navigation extends BaseControl
{
	var $navigation;
	var $view;

	function Navigation($parameters, &$page)
	{
		$this->navigation = new NavigationModel();
		$this->view  = new NavigationView();
		
		parent::BaseControl($parameters, &$page);
	}

	function Execute()
	{
		switch ($this->GetParameters('show'))
		{
			case 'left':
				$this->navigation->Retrieve(&$this->parameters);
				$this->view->PrintLeftMenu(&$this->navigation);
				break;
		}

		parent::Execute();
	}

	function ValidateArguments()
	{
		return (count($this->parameters) == 1);
	}
}
?>